package edu.njust.dao;

import edu.njust.domain.Room;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoomMapper {
    //根据房间号找到房间id
    public int selectidbyname(String roomNumber);
    //标准四件套
    public int deleteById(int id);
    //修改房间状态为预定
    public int updateroomStateone(int id);
    //修改房间状态为入住
    public int updateroomStatetwo(int id);
    //修改房间状态为未入住
    public int updateroomStatethree(int id);
    public int insertAll(Room room);
    public	Room selectById(int id);
    public int updateById(Room room);
    //分页模糊查询
    public List<Room> pageFuzzyselect(@Param("roomNumber")String roomNumber, @Param("start")int start, @Param("pageSize")int pageSize);
    //分页模糊查询总条数
    public int countFuzzyselect(String roomNumber);
    //查询全部
    public List<Room> selectAll();
    //根据客房等级来查询
    public List<Room> selectByLeveId(int id);
    //根据客房等级查空房数量
    public int countselectByLeveId(int id);
    //ajax 验证是否存在 此房间号
    public int selectYZ(String roomNumber);
    // 非本派所用  安排房间时 需要改变当前房间的房态
    public int updateByIdToRoomState(Room room);
    //非本派所用  查询房间信息
    public  List<Room> selectInformation(String roomNumber);
    //非本派所用  客服等级来查询房间信息
    public  List<Room> levelSelectInformation(int guestRoomLevelID);
    //
}
